<template>
	<el-container>
		<el-header>
			<div class="left-panel">
				<span style="font-size: 18px;font-weight: 600">《{{formTitle}}》表单日志</span>
			</div>
			<div class="right-panel">
			</div>
		</el-header>
		<el-main class="nopadding">
			<scTable ref="table" :apiObj="apiObj" :params="{formId:this.formId,runId:this.runId}" row-key="runId" border drag-sort stripe>
				<el-table-column label="#" type="index" width="50"></el-table-column>
				<el-table-column label="步骤名称" prop="stepName" width="100" :show-overflow-tooltip="true"></el-table-column>
				<el-table-column label="操作时间" prop="createTime" width="150"></el-table-column>
				<el-table-column label="操作人" prop="createUserName" width="100" :show-overflow-tooltip="true"></el-table-column>
				<el-table-column v-for="item in fieldList" :key="item.prop" :label="item.label" :prop="item.prop" :width="item.width" :show-overflow-tooltip="true"></el-table-column>
			</scTable>
		</el-main>
	</el-container>
</template>

<script>
export default {
	name: 'Bpm Data Log Record',
	components: {
	},
	data() {
		return {
			fieldList:[],
			apiObj: this.$API.bpm.formDataLog.getAllFormDataLog,
			selection: [],
			formId:this.$route.query.formId,
			runId:this.$route.query.runId,
			formTitle:this.$route.query.formTitle
		}
	},
	mounted() {
		this.getFormDataFieldTitle();
	},
	methods: {
		async getFormDataFieldTitle(){
			var res = await this.$API.bpm.bpmForm.getFormDataFieldTitle.get({formId: this.formId});
			if (res.code == 200) {
				this.fieldList = res.data;
			} else {
				this.$alert(res.message, "提示", {type: 'error'})
			}
		},
	}
}
</script>

<style>
</style>
